import request from '@/config/axios'

// ERP SKU级产品 VO
export interface ErpProductSkuVO {
  id: number // 产品编号
  sku: number // SKU
  barCode: string // 商品条码
  status: number // 状态
  standard: string // 尺码
}

// ERP SKU级产品 API
export const ErpProductSkuApi = {
  // 查询ERP SKU级产品分页
  getErpProductSkuPage: async (params: any) => {
    return await request.get({ url: `/myerp/erp-product-sku/page`, params })
  },

  // 查询ERP SKU级产品详情
  getErpProductSku: async (id: number) => {
    return await request.get({ url: `/myerp/erp-product-sku/get?id=` + id })
  },

  // 新增ERP SKU级产品
  createErpProductSku: async (data: ErpProductSkuVO) => {
    return await request.post({ url: `/myerp/erp-product-sku/create`, data })
  },

  // 修改ERP SKU级产品
  updateErpProductSku: async (data: ErpProductSkuVO) => {
    return await request.put({ url: `/myerp/erp-product-sku/update`, data })
  },

  // 删除ERP SKU级产品
  deleteErpProductSku: async (id: number) => {
    return await request.delete({ url: `/myerp/erp-product-sku/delete?id=` + id })
  },

  // 导出ERP SKU级产品 Excel
  exportErpProductSku: async (params) => {
    return await request.download({ url: `/myerp/erp-product-sku/export-excel`, params })
  }
}